﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RequisitionDetails.aspx.cs" Inherits="logicunivesityinventorystore.Department.RequisitionDetails" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script language="javascript" type="text/javascript">
         function getbacktostepone() {
             window.location = "EditExpanse.aspx";
         }
         function onSuccess() {
             setTimeout(okay, 2000);
         }
         function onError() {
             setTimeout(getbacktostepone, 2000);
         }
         function okay() {
             var UIMODE = $get('hdnWindowUIMODE').value;
             if (UIMODE == "EDIT")
                 window.parent.document.getElementById('ButtonEditDone').click();
             else {
                 window.parent.document.getElementById('btnOkay').click();
                 getbacktostepone();
             }
         }
         function cancel() {
             var UIMODE = $get('hdnWindowUIMODE').value;
             if (UIMODE == "EDIT")
                 window.parent.document.getElementById('ButtonEditCancel').click();
             else
                 window.parent.document.getElementById('btnCancel').click();
         }
    </script>
</head>
<body>
    <form id="form1" runat="server">
  <input type="hidden" value="" runat="server" id="hdnWindowUIMODE" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="popup_Container">
        <div class="popup_Titlebar" id="PopupHeader">
            <div class="TitlebarLeft">
                Edit Expanse
            </div>
            <div class="TitlebarRight" onclick="cancel();">
            </div>
        </div>
        <div class="popup_Body">
            <asp:MultiView ID="MultiViewExpanse" runat="server">
                <asp:View ID="ViewInput" runat="server">
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
                    </asp:DropDownList>
                    <br />
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        DataSourceID="ObjectDataSource1">
                        <Columns>
                            <asp:BoundField DataField="ItemCode" HeaderText="Item Code" />
                            <asp:BoundField DataField="ItemName" HeaderText="Item Name" />
                            <asp:BoundField DataField="Category" HeaderText="Category" />
                            <asp:BoundField DataField="Qty" HeaderText="Qty" />
                        </Columns>
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                        SelectMethod="getRequsitionDetails" 
                        TypeName="BusinessLogicLayer.RequisitionFacade">
                        <SelectParameters>
                            <asp:Parameter Name="formID" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </asp:View>
                
            </asp:MultiView>
        </div>
        <div class="popup_Buttons">
            <asp:Button ID="btnOkay" Text="Done" runat="server" OnClick="btnOkay_Click" />
            <input id="btnCancel" value="Cancel" type="button" onclick="cancel();" />
        </div>
    </div>
    </form>
</body>
</html>
